package org.jeecg.modules.asset.chartInfo.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.asset.chartInfo.entity.Chartinfo;
import org.jeecg.modules.asset.chartInfo.mapper.ChartinfoMapper;
import org.jeecg.modules.asset.chartInfo.service.IChartinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: ChartInfo
 * @Author: jeecg-boot
 * @Date:   2020-03-30
 * @Version: V1.0
 */
@Service
public class ChartinfoServiceImpl extends ServiceImpl<ChartinfoMapper, Chartinfo> implements IChartinfoService {

    @Autowired
    private ChartinfoMapper chartinfoMapper;

    /**
     * 返回所有的经营项目
     * @return
     */
    @Override
    public List<String> findAllFareItem() {
        return chartinfoMapper.findAllFareItem();
    }

    @Override
    public Chartinfo getByGuid(String chartguid) {
        return chartinfoMapper.getByGuid(chartguid);
    }

    @Override
    public void updateIsHistoryByGuid(String chartguid) {
        chartinfoMapper.updateIsHistoryByGuid(chartguid);
    }

    @Override
    public void updateByGuid(Chartinfo chartinfo) {
        chartinfoMapper.updateByGuid(chartinfo);
    }


    @Override
    public IPage<Chartinfo> getByFuzzy(Page<Chartinfo> page,String str) {
        return chartinfoMapper.getByFuzzy(page,str);
    }
}
